<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>widgets</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;widgets
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="widgets-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="widgets-module.html">Module widgets</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#coding: utf-8</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">'''Displayables for the HUD.</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">pygame</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module gfxmanager=gfxmanager-module.html"><a title="gfxmanager" class="py-name" href="#" onclick="return doclink('link-0', 'gfxmanager', 'link-0');">gfxmanager</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class gfxmanager.GfxManager=gfxmanager.GfxManager-class.html"><a title="gfxmanager.GfxManager" class="py-name" href="#" onclick="return doclink('link-1', 'GfxManager', 'link-1');">GfxManager</a></tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-string">"""This module supplies a number of widgets used to form the GUI."""</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"> </tt>
<a name="Widget"></a><div id="Widget-def"><a name="L12"></a><tt class="py-lineno"> 12</tt> <a class="py-toggle" href="#" id="Widget-toggle" onclick="return toggle('Widget');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="widgets.Widget-class.html">Widget</a><tt class="py-op">(</tt><tt class="py-base-class">pygame</tt><tt class="py-op">.</tt><tt class="py-base-class">sprite</tt><tt class="py-op">.</tt><tt class="py-base-class">Sprite</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Widget-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Widget-expanded"><a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line">  <tt class="py-docstring">"""A base widget object to be inherited from."""</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="Widget.__init__"></a><div id="Widget.__init__-def"><a name="L15"></a><tt class="py-lineno"> 15</tt> <a class="py-toggle" href="#" id="Widget.__init__-toggle" onclick="return toggle('Widget.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.Widget-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">pos</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">groups</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Widget.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Widget.__init__-expanded"><a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">    <tt class="py-name">pygame</tt><tt class="py-op">.</tt><tt class="py-name">sprite</tt><tt class="py-op">.</tt><tt class="py-name">Sprite</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method application.AGApplication.__init__()=application.AGApplication-class.html#__init__,Method application.AGLevel.__init__()=application.AGLevel-class.html#__init__,Method application.AGMenu.__init__()=application.AGMenu-class.html#__init__,Method background.BackgroundImage.__init__()=background.BackgroundImage-class.html#__init__,Method background.BackgroundObject.__init__()=background.BackgroundObject-class.html#__init__,Method background.CloserStar.__init__()=background.CloserStar-class.html#__init__,Method background.CloserStarCluster.__init__()=background.CloserStarCluster-class.html#__init__,Method background.DistantStar.__init__()=background.DistantStar-class.html#__init__,Method background.SpaceBackground.__init__()=background.SpaceBackground-class.html#__init__,Method base.AGObject.__init__()=base.AGObject-class.html#__init__,Method base.Overlay.__init__()=base.Overlay-class.html#__init__,Method clock.Clock.__init__()=clock.Clock-class.html#__init__,Method hud.Hud.__init__()=hud.Hud-class.html#__init__,Method mover.CircularMover.__init__()=mover.CircularMover-class.html#__init__,Method mover.LinearMover.__init__()=mover.LinearMover-class.html#__init__,Method mover.LinearPlayerTargetingMover.__init__()=mover.LinearPlayerTargetingMover-class.html#__init__,Method mover.Mover.__init__()=mover.Mover-class.html#__init__,Method mover.RandomMover.__init__()=mover.RandomMover-class.html#__init__,Method mover.SeekingMover.__init__()=mover.SeekingMover-class.html#__init__,Method mover.ZigZagMover.__init__()=mover.ZigZagMover-class.html#__init__,Method obstacle.MovingObstacle.__init__()=obstacle.MovingObstacle-class.html#__init__,Method obstacle.Obstacle.__init__()=obstacle.Obstacle-class.html#__init__,Method signals.Signal.__init__()=signals.Signal-class.html#__init__,Method signals.WeakMethod.__init__()=signals.WeakMethod-class.html#__init__,Method signals._WeakMethod_FuncHost.__init__()=signals._WeakMethod_FuncHost-class.html#__init__,Method spaceship.AGSprite.__init__()=spaceship.AGSprite-class.html#__init__,Method spaceship.AmmoConsumingItem.__init__()=spaceship.AmmoConsumingItem-class.html#__init__,Method spaceship.AmmoWeapon.__init__()=spaceship.AmmoWeapon-class.html#__init__,Method spaceship.Armour.__init__()=spaceship.Armour-class.html#__init__,Method spaceship.AutoShield.__init__()=spaceship.AutoShield-class.html#__init__,Method spaceship.BasicArmour.__init__()=spaceship.BasicArmour-class.html#__init__,Method spaceship.BasicReactor.__init__()=spaceship.BasicReactor-class.html#__init__,Method spaceship.Bonus.__init__()=spaceship.Bonus-class.html#__init__,Method spaceship.Destructible.__init__()=spaceship.Destructible-class.html#__init__,Method spaceship.EnemyMine.__init__()=spaceship.EnemyMine-class.html#__init__,Method spaceship.EnemyShip.__init__()=spaceship.EnemyShip-class.html#__init__,Method spaceship.EnergyConsumingItem.__init__()=spaceship.EnergyConsumingItem-class.html#__init__,Method spaceship.EnergyProjectileExplosion.__init__()=spaceship.EnergyProjectileExplosion-class.html#__init__,Method spaceship.EnergyWeapon.__init__()=spaceship.EnergyWeapon-class.html#__init__,Method spaceship.Explosion.__init__()=spaceship.Explosion-class.html#__init__,Method spaceship.InstantEnergyBeam.__init__()=spaceship.InstantEnergyBeam-class.html#__init__,Method spaceship.InstantEnergyWeapon.__init__()=spaceship.InstantEnergyWeapon-class.html#__init__,Method spaceship.MultiCannon.__init__()=spaceship.MultiCannon-class.html#__init__,Method spaceship.MultiShotProjectileWeapon.__init__()=spaceship.MultiShotProjectileWeapon-class.html#__init__,Method spaceship.PlayerShip.__init__()=spaceship.PlayerShip-class.html#__init__,Method spaceship.Projectile.__init__()=spaceship.Projectile-class.html#__init__,Method spaceship.ProjectileAmmoWeapon.__init__()=spaceship.ProjectileAmmoWeapon-class.html#__init__,Method spaceship.ProjectileEnergyWeapon.__init__()=spaceship.ProjectileEnergyWeapon-class.html#__init__,Method spaceship.Reactor.__init__()=spaceship.Reactor-class.html#__init__,Method spaceship.RechargeBonus.__init__()=spaceship.RechargeBonus-class.html#__init__,Method spaceship.ScatteringProjectile.__init__()=spaceship.ScatteringProjectile-class.html#__init__,Method spaceship.SeekingProjectile.__init__()=spaceship.SeekingProjectile-class.html#__init__,Method spaceship.Shield.__init__()=spaceship.Shield-class.html#__init__,Method spaceship.ShieldUpgradeBonus.__init__()=spaceship.ShieldUpgradeBonus-class.html#__init__,Method spaceship.Ship.__init__()=spaceship.Ship-class.html#__init__,Method spaceship.SuperShield.__init__()=spaceship.SuperShield-class.html#__init__,Method spaceship.TargetedProjectileAmmoWeapon.__init__()=spaceship.TargetedProjectileAmmoWeapon-class.html#__init__,Method spaceship.TargetedProjectileEnergyWeapon.__init__()=spaceship.TargetedProjectileEnergyWeapon-class.html#__init__,Method spaceship.TargetedProjectileWeapon.__init__()=spaceship.TargetedProjectileWeapon-class.html#__init__,Method spaceship.Weapon.__init__()=spaceship.Weapon-class.html#__init__,Method widgets.VerticalProgressBar.__init__()=widgets.VerticalProgressBar-class.html#__init__,Method widgets.Widget.__init__()=widgets.Widget-class.html#__init__"><a title="application.AGApplication.__init__
application.AGLevel.__init__
application.AGMenu.__init__
background.BackgroundImage.__init__
background.BackgroundObject.__init__
background.CloserStar.__init__
background.CloserStarCluster.__init__
background.DistantStar.__init__
background.SpaceBackground.__init__
base.AGObject.__init__
base.Overlay.__init__
clock.Clock.__init__
hud.Hud.__init__
mover.CircularMover.__init__
mover.LinearMover.__init__
mover.LinearPlayerTargetingMover.__init__
mover.Mover.__init__
mover.RandomMover.__init__
mover.SeekingMover.__init__
mover.ZigZagMover.__init__
obstacle.MovingObstacle.__init__
obstacle.Obstacle.__init__
signals.Signal.__init__
signals.WeakMethod.__init__
signals._WeakMethod_FuncHost.__init__
spaceship.AGSprite.__init__
spaceship.AmmoConsumingItem.__init__
spaceship.AmmoWeapon.__init__
spaceship.Armour.__init__
spaceship.AutoShield.__init__
spaceship.BasicArmour.__init__
spaceship.BasicReactor.__init__
spaceship.Bonus.__init__
spaceship.Destructible.__init__
spaceship.EnemyMine.__init__
spaceship.EnemyShip.__init__
spaceship.EnergyConsumingItem.__init__
spaceship.EnergyProjectileExplosion.__init__
spaceship.EnergyWeapon.__init__
spaceship.Explosion.__init__
spaceship.InstantEnergyBeam.__init__
spaceship.InstantEnergyWeapon.__init__
spaceship.MultiCannon.__init__
spaceship.MultiShotProjectileWeapon.__init__
spaceship.PlayerShip.__init__
spaceship.Projectile.__init__
spaceship.ProjectileAmmoWeapon.__init__
spaceship.ProjectileEnergyWeapon.__init__
spaceship.Reactor.__init__
spaceship.RechargeBonus.__init__
spaceship.ScatteringProjectile.__init__
spaceship.SeekingProjectile.__init__
spaceship.Shield.__init__
spaceship.ShieldUpgradeBonus.__init__
spaceship.Ship.__init__
spaceship.SuperShield.__init__
spaceship.TargetedProjectileAmmoWeapon.__init__
spaceship.TargetedProjectileEnergyWeapon.__init__
spaceship.TargetedProjectileWeapon.__init__
spaceship.Weapon.__init__
widgets.VerticalProgressBar.__init__
widgets.Widget.__init__" class="py-name" href="#" onclick="return doclink('link-2', '__init__', 'link-2');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">groups</tt><tt class="py-op">)</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pos</tt> <tt class="py-op">=</tt> <tt class="py-name">pos</tt> </tt>
</div></div><a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">  <tt class="py-comment">#  self.__focus = False</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">  <tt class="py-comment">#def get_focus(self): return self.__focus</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-comment"></tt>  <tt class="py-comment">#def set_focus(self, val): self.__focus = val</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-comment"></tt>  <tt class="py-comment">#focus = property(get_focus, set_focus)</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="VerticalProgressBar"></a><div id="VerticalProgressBar-def"><a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="VerticalProgressBar-toggle" onclick="return toggle('VerticalProgressBar');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html">VerticalProgressBar</a><tt class="py-op">(</tt><tt class="py-base-class">Widget</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="VerticalProgressBar-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring">  Vertical progress bar or indicator available in 8 colours.</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">  @type val: integer</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">  @ivar val: Property; takes values from C{minimum} to C{maximum}.</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">      Indicates how much of the bar should be lit.</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-docstring">  @type min: integer</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-docstring">  @ivar min: The minimum value the bar can display. Setting a value</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-docstring">      lower than C{min} will cause an exception to be raised.</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-docstring">  @type max: integer</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">  @ivar max: The maximum value the bar can display. Setting a value</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">      higher than C{max} will cause an exception to be raised.</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring">  @type color: string</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">  @ivar color: Property; allowed values are: 'green', 'cyan', 'blue',</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring">      'magenta', 'red', 'yellow', 'black', 'white'.</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-docstring">  @type length: unsigned integer</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line"><tt class="py-docstring">  @ivar length: The height of the widget.</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">   </tt>
<a name="VerticalProgressBar.__init__"></a><div id="VerticalProgressBar.__init__-def"><a name="L50"></a><tt class="py-lineno"> 50</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.__init__-toggle" onclick="return toggle('VerticalProgressBar.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">pos</tt><tt class="py-op">,</tt> <tt class="py-param">length</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">groups</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="VerticalProgressBar.__init__-expanded"><a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">    <tt id="link-3" class="py-name" targets="Class widgets.Widget=widgets.Widget-class.html"><a title="widgets.Widget" class="py-name" href="#" onclick="return doclink('link-3', 'Widget', 'link-3');">Widget</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="application.AGApplication.__init__
application.AGLevel.__init__
application.AGMenu.__init__
background.BackgroundImage.__init__
background.BackgroundObject.__init__
background.CloserStar.__init__
background.CloserStarCluster.__init__
background.DistantStar.__init__
background.SpaceBackground.__init__
base.AGObject.__init__
base.Overlay.__init__
clock.Clock.__init__
hud.Hud.__init__
mover.CircularMover.__init__
mover.LinearMover.__init__
mover.LinearPlayerTargetingMover.__init__
mover.Mover.__init__
mover.RandomMover.__init__
mover.SeekingMover.__init__
mover.ZigZagMover.__init__
obstacle.MovingObstacle.__init__
obstacle.Obstacle.__init__
signals.Signal.__init__
signals.WeakMethod.__init__
signals._WeakMethod_FuncHost.__init__
spaceship.AGSprite.__init__
spaceship.AmmoConsumingItem.__init__
spaceship.AmmoWeapon.__init__
spaceship.Armour.__init__
spaceship.AutoShield.__init__
spaceship.BasicArmour.__init__
spaceship.BasicReactor.__init__
spaceship.Bonus.__init__
spaceship.Destructible.__init__
spaceship.EnemyMine.__init__
spaceship.EnemyShip.__init__
spaceship.EnergyConsumingItem.__init__
spaceship.EnergyProjectileExplosion.__init__
spaceship.EnergyWeapon.__init__
spaceship.Explosion.__init__
spaceship.InstantEnergyBeam.__init__
spaceship.InstantEnergyWeapon.__init__
spaceship.MultiCannon.__init__
spaceship.MultiShotProjectileWeapon.__init__
spaceship.PlayerShip.__init__
spaceship.Projectile.__init__
spaceship.ProjectileAmmoWeapon.__init__
spaceship.ProjectileEnergyWeapon.__init__
spaceship.Reactor.__init__
spaceship.RechargeBonus.__init__
spaceship.ScatteringProjectile.__init__
spaceship.SeekingProjectile.__init__
spaceship.Shield.__init__
spaceship.ShieldUpgradeBonus.__init__
spaceship.Ship.__init__
spaceship.SuperShield.__init__
spaceship.TargetedProjectileAmmoWeapon.__init__
spaceship.TargetedProjectileEnergyWeapon.__init__
spaceship.TargetedProjectileWeapon.__init__
spaceship.Weapon.__init__
widgets.VerticalProgressBar.__init__
widgets.Widget.__init__" class="py-name" href="#" onclick="return doclink('link-4', '__init__', 'link-2');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">pos</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">groups</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">     </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="gfxmanager.GfxManager" class="py-name" href="#" onclick="return doclink('link-5', 'GfxManager', 'link-1');">GfxManager</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method dbmanager.DBManager.get()=dbmanager.DBManager-class.html#get,Method gfxmanager.GfxManager.get()=gfxmanager.GfxManager-class.html#get,Method groupmanager.GroupManager.get()=groupmanager.GroupManager-class.html#get,Method stagemanager.StageManager.get()=stagemanager.StageManager-class.html#get"><a title="dbmanager.DBManager.get
gfxmanager.GfxManager.get
groupmanager.GroupManager.get
stagemanager.StageManager.get" class="py-name" href="#" onclick="return doclink('link-6', 'get', 'link-6');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'StripVertical'</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__min</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__max</tt> <tt class="py-op">=</tt> <tt class="py-number">100</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__val</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__color</tt> <tt class="py-op">=</tt> <tt class="py-string">'yellow'</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">length</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method background.BackgroundImage.update()=background.BackgroundImage-class.html#update,Method background.BackgroundObject.update()=background.BackgroundObject-class.html#update,Method background.SpaceBackground.update()=background.SpaceBackground-class.html#update,Method hud.Hud.update()=hud.Hud-class.html#update,Method mover.CircularMover.update()=mover.CircularMover-class.html#update,Method mover.LinearMover.update()=mover.LinearMover-class.html#update,Method mover.LinearPlayerTargetingMover.update()=mover.LinearPlayerTargetingMover-class.html#update,Method mover.Mover.update()=mover.Mover-class.html#update,Method mover.RandomMover.update()=mover.RandomMover-class.html#update,Method mover.SeekingMover.update()=mover.SeekingMover-class.html#update,Method mover.ZigZagMover.update()=mover.ZigZagMover-class.html#update,Method spaceship.AGSprite.update()=spaceship.AGSprite-class.html#update,Method spaceship.AutoShield.update()=spaceship.AutoShield-class.html#update,Method spaceship.Bonus.update()=spaceship.Bonus-class.html#update,Method spaceship.EnemyMine.update()=spaceship.EnemyMine-class.html#update,Method spaceship.EnemyShip.update()=spaceship.EnemyShip-class.html#update,Method spaceship.Explosion.update()=spaceship.Explosion-class.html#update,Method spaceship.InstantEnergyBeam.update()=spaceship.InstantEnergyBeam-class.html#update,Method spaceship.PlayerShip.update()=spaceship.PlayerShip-class.html#update,Method spaceship.Projectile.update()=spaceship.Projectile-class.html#update,Method spaceship.ScatteringProjectile.update()=spaceship.ScatteringProjectile-class.html#update,Method spaceship.Shield.update()=spaceship.Shield-class.html#update,Method spaceship.Ship.update()=spaceship.Ship-class.html#update,Method spaceship.SuperShield.update()=spaceship.SuperShield-class.html#update,Method spaceship.Weapon.update()=spaceship.Weapon-class.html#update,Method widgets.VerticalProgressBar.update()=widgets.VerticalProgressBar-class.html#update"><a title="background.BackgroundImage.update
background.BackgroundObject.update
background.SpaceBackground.update
hud.Hud.update
mover.CircularMover.update
mover.LinearMover.update
mover.LinearPlayerTargetingMover.update
mover.Mover.update
mover.RandomMover.update
mover.SeekingMover.update
mover.ZigZagMover.update
spaceship.AGSprite.update
spaceship.AutoShield.update
spaceship.Bonus.update
spaceship.EnemyMine.update
spaceship.EnemyShip.update
spaceship.Explosion.update
spaceship.InstantEnergyBeam.update
spaceship.PlayerShip.update
spaceship.Projectile.update
spaceship.ScatteringProjectile.update
spaceship.Shield.update
spaceship.Ship.update
spaceship.SuperShield.update
spaceship.Weapon.update
widgets.VerticalProgressBar.update" class="py-name" href="#" onclick="return doclink('link-7', 'update', 'link-7');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  <tt class="py-comment"># initializes self.image and self.rect needed for drawing</tt> </tt>
</div><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"> </tt>
<a name="VerticalProgressBar.get_min"></a><div id="VerticalProgressBar.get_min-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.get_min-toggle" onclick="return toggle('VerticalProgressBar.get_min');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#get_min">get_min</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__min</tt> </tt>
</div><a name="VerticalProgressBar.set_min"></a><div id="VerticalProgressBar.set_min-def"><a name="L65"></a><tt class="py-lineno"> 65</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.set_min-toggle" onclick="return toggle('VerticalProgressBar.set_min');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#set_min">set_min</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">min</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar.set_min-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="VerticalProgressBar.set_min-expanded"><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt id="link-8" class="py-name" targets="Variable widgets.VerticalProgressBar.min=widgets.VerticalProgressBar-class.html#min"><a title="widgets.VerticalProgressBar.min" class="py-name" href="#" onclick="return doclink('link-8', 'min', 'link-8');">min</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">long</tt><tt class="py-op">,</tt> <tt class="py-name">float</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">      <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">'Incorrect argument type. Must be one of: int, long, float.'</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__min</tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="widgets.VerticalProgressBar.min" class="py-name" href="#" onclick="return doclink('link-9', 'min', 'link-8');">min</a></tt> </tt>
</div><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">      <tt class="py-comment">#self.update()</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-comment"></tt>  <tt id="link-10" class="py-name"><a title="widgets.VerticalProgressBar.min" class="py-name" href="#" onclick="return doclink('link-10', 'min', 'link-8');">min</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-11" class="py-name" targets="Method widgets.VerticalProgressBar.get_min()=widgets.VerticalProgressBar-class.html#get_min"><a title="widgets.VerticalProgressBar.get_min" class="py-name" href="#" onclick="return doclink('link-11', 'get_min', 'link-11');">get_min</a></tt><tt class="py-op">,</tt> <tt id="link-12" class="py-name" targets="Method widgets.VerticalProgressBar.set_min()=widgets.VerticalProgressBar-class.html#set_min"><a title="widgets.VerticalProgressBar.set_min" class="py-name" href="#" onclick="return doclink('link-12', 'set_min', 'link-12');">set_min</a></tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"> </tt>
<a name="VerticalProgressBar.get_max"></a><div id="VerticalProgressBar.get_max-def"><a name="L73"></a><tt class="py-lineno"> 73</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.get_max-toggle" onclick="return toggle('VerticalProgressBar.get_max');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#get_max">get_max</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__max</tt> </tt>
</div><a name="VerticalProgressBar.set_max"></a><div id="VerticalProgressBar.set_max-def"><a name="L74"></a><tt class="py-lineno"> 74</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.set_max-toggle" onclick="return toggle('VerticalProgressBar.set_max');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#set_max">set_max</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">max</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar.set_max-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="VerticalProgressBar.set_max-expanded"><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt id="link-13" class="py-name" targets="Variable widgets.VerticalProgressBar.max=widgets.VerticalProgressBar-class.html#max"><a title="widgets.VerticalProgressBar.max" class="py-name" href="#" onclick="return doclink('link-13', 'max', 'link-13');">max</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-name">int</tt><tt class="py-op">,</tt> <tt class="py-name">long</tt><tt class="py-op">,</tt> <tt class="py-name">float</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">      <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">'Incorrect argument type. Must be one of: int, long, float.'</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__max</tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name"><a title="widgets.VerticalProgressBar.max" class="py-name" href="#" onclick="return doclink('link-14', 'max', 'link-13');">max</a></tt> </tt>
</div><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">      <tt class="py-comment">#self.update()</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-comment"></tt>  <tt id="link-15" class="py-name"><a title="widgets.VerticalProgressBar.max" class="py-name" href="#" onclick="return doclink('link-15', 'max', 'link-13');">max</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-16" class="py-name" targets="Method widgets.VerticalProgressBar.get_max()=widgets.VerticalProgressBar-class.html#get_max"><a title="widgets.VerticalProgressBar.get_max" class="py-name" href="#" onclick="return doclink('link-16', 'get_max', 'link-16');">get_max</a></tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Method widgets.VerticalProgressBar.set_max()=widgets.VerticalProgressBar-class.html#set_max"><a title="widgets.VerticalProgressBar.set_max" class="py-name" href="#" onclick="return doclink('link-17', 'set_max', 'link-17');">set_max</a></tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line"> </tt>
<a name="VerticalProgressBar.get_val"></a><div id="VerticalProgressBar.get_val-def"><a name="L82"></a><tt class="py-lineno"> 82</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.get_val-toggle" onclick="return toggle('VerticalProgressBar.get_val');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#get_val">get_val</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__val</tt> </tt>
</div><a name="VerticalProgressBar.set_val"></a><div id="VerticalProgressBar.set_val-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.set_val-toggle" onclick="return toggle('VerticalProgressBar.set_val');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#set_val">set_val</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">val</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar.set_val-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="VerticalProgressBar.set_val-expanded"><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-18" class="py-name" targets="Variable widgets.VerticalProgressBar.val=widgets.VerticalProgressBar-class.html#val"><a title="widgets.VerticalProgressBar.val" class="py-name" href="#" onclick="return doclink('link-18', 'val', 'link-18');">val</a></tt> <tt class="py-op">&gt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="widgets.VerticalProgressBar.max" class="py-name" href="#" onclick="return doclink('link-19', 'max', 'link-13');">max</a></tt> <tt class="py-keyword">or</tt> <tt id="link-20" class="py-name"><a title="widgets.VerticalProgressBar.val" class="py-name" href="#" onclick="return doclink('link-20', 'val', 'link-18');">val</a></tt> <tt class="py-op">&lt;</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="widgets.VerticalProgressBar.min" class="py-name" href="#" onclick="return doclink('link-21', 'min', 'link-8');">min</a></tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">      <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">'Value outside range. Required value between %d and %d. Got %d.'</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">                       <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="widgets.VerticalProgressBar.min" class="py-name" href="#" onclick="return doclink('link-22', 'min', 'link-8');">min</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="widgets.VerticalProgressBar.max" class="py-name" href="#" onclick="return doclink('link-23', 'max', 'link-13');">max</a></tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name"><a title="widgets.VerticalProgressBar.val" class="py-name" href="#" onclick="return doclink('link-24', 'val', 'link-18');">val</a></tt><tt class="py-op">)</tt> <tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__val</tt> <tt class="py-op">=</tt> <tt id="link-25" class="py-name"><a title="widgets.VerticalProgressBar.val" class="py-name" href="#" onclick="return doclink('link-25', 'val', 'link-18');">val</a></tt> </tt>
</div><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">      <tt class="py-comment">#self.update()</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-comment"></tt>  <tt id="link-26" class="py-name"><a title="widgets.VerticalProgressBar.val" class="py-name" href="#" onclick="return doclink('link-26', 'val', 'link-18');">val</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-27" class="py-name" targets="Method widgets.VerticalProgressBar.get_val()=widgets.VerticalProgressBar-class.html#get_val"><a title="widgets.VerticalProgressBar.get_val" class="py-name" href="#" onclick="return doclink('link-27', 'get_val', 'link-27');">get_val</a></tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name" targets="Method widgets.VerticalProgressBar.set_val()=widgets.VerticalProgressBar-class.html#set_val"><a title="widgets.VerticalProgressBar.set_val" class="py-name" href="#" onclick="return doclink('link-28', 'set_val', 'link-28');">set_val</a></tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"> </tt>
<a name="VerticalProgressBar.get_color"></a><div id="VerticalProgressBar.get_color-def"><a name="L92"></a><tt class="py-lineno"> 92</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.get_color-toggle" onclick="return toggle('VerticalProgressBar.get_color');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#get_color">get_color</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__color</tt> </tt>
</div><a name="VerticalProgressBar.set_color"></a><div id="VerticalProgressBar.set_color-def"><a name="L93"></a><tt class="py-lineno"> 93</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.set_color-toggle" onclick="return toggle('VerticalProgressBar.set_color');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#set_color">set_color</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">color</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar.set_color-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="VerticalProgressBar.set_color-expanded"><a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">    <tt class="py-name">colors</tt> <tt class="py-op">=</tt> <tt class="py-string">'green'</tt><tt class="py-op">,</tt> <tt class="py-string">'cyan'</tt><tt class="py-op">,</tt> <tt class="py-string">'blue'</tt><tt class="py-op">,</tt> <tt class="py-string">'magenta'</tt><tt class="py-op">,</tt> \ </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">             <tt class="py-string">'red'</tt><tt class="py-op">,</tt> <tt class="py-string">'yellow'</tt><tt class="py-op">,</tt> <tt class="py-string">'black'</tt><tt class="py-op">,</tt> <tt class="py-string">'white'</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-29" class="py-name" targets="Variable widgets.VerticalProgressBar.color=widgets.VerticalProgressBar-class.html#color"><a title="widgets.VerticalProgressBar.color" class="py-name" href="#" onclick="return doclink('link-29', 'color', 'link-29');">color</a></tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">colors</tt><tt class="py-op">:</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">      <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">'Unsupported color. Choose between: '</tt> <tt class="py-op">+</tt>  </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                      <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">colors</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__color</tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name"><a title="widgets.VerticalProgressBar.color" class="py-name" href="#" onclick="return doclink('link-30', 'color', 'link-29');">color</a></tt> </tt>
</div><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">  <tt id="link-31" class="py-name"><a title="widgets.VerticalProgressBar.color" class="py-name" href="#" onclick="return doclink('link-31', 'color', 'link-29');">color</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-32" class="py-name" targets="Method widgets.VerticalProgressBar.get_color()=widgets.VerticalProgressBar-class.html#get_color"><a title="widgets.VerticalProgressBar.get_color" class="py-name" href="#" onclick="return doclink('link-32', 'get_color', 'link-32');">get_color</a></tt><tt class="py-op">,</tt> <tt id="link-33" class="py-name" targets="Method widgets.VerticalProgressBar.set_color()=widgets.VerticalProgressBar-class.html#set_color"><a title="widgets.VerticalProgressBar.set_color" class="py-name" href="#" onclick="return doclink('link-33', 'set_color', 'link-33');">set_color</a></tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"> </tt>
<a name="VerticalProgressBar.get_strip_img"></a><div id="VerticalProgressBar.get_strip_img-def"><a name="L103"></a><tt class="py-lineno">103</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.get_strip_img-toggle" onclick="return toggle('VerticalProgressBar.get_strip_img');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#get_strip_img">get_strip_img</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar.get_strip_img-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="VerticalProgressBar.get_strip_img-expanded"><a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">    <tt class="py-docstring">"""Return an image of a single 'light strip' (i.e. state)."""</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-name">img</tt> <tt class="py-op">=</tt> <tt class="py-name">pygame</tt><tt class="py-op">.</tt><tt class="py-name">Surface</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'w'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                          <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'h'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                         <tt class="py-name">pygame</tt><tt class="py-op">.</tt><tt class="py-name">SRCALPHA</tt><tt class="py-op">,</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                         <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'image'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">    <tt class="py-name">area</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'states'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__color</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'x_off'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> \ </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">           <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'states'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__color</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'y_off'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> \ </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">           <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'w'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> \ </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">           <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'h'</tt><tt class="py-op">]</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt class="py-name">img</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Method base.Overlay.blit()=base.Overlay-class.html#blit"><a title="base.Overlay.blit" class="py-name" href="#" onclick="return doclink('link-34', 'blit', 'link-34');">blit</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'image'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">area</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">img</tt> </tt>
</div><a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line"> </tt>
<a name="VerticalProgressBar.update"></a><div id="VerticalProgressBar.update-def"><a name="L116"></a><tt class="py-lineno">116</tt> <a class="py-toggle" href="#" id="VerticalProgressBar.update-toggle" onclick="return toggle('VerticalProgressBar.update');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="widgets.VerticalProgressBar-class.html#update">update</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="VerticalProgressBar.update-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="VerticalProgressBar.update-expanded"><a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt class="py-docstring">"""Update the C{image} and C{rect} of the widget."""</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt class="py-comment"># sprowadzenie wartosci do przedzialu &lt;0, 100&gt;:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-comment"># self.__val * 100. / abs(self.max - self.min)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">tmp_val</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__val</tt> <tt class="py-op">*</tt> <tt class="py-number">100.</tt> <tt class="py-op">/</tt> <tt class="py-name">abs</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="widgets.VerticalProgressBar.max" class="py-name" href="#" onclick="return doclink('link-35', 'max', 'link-13');">max</a></tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="widgets.VerticalProgressBar.min" class="py-name" href="#" onclick="return doclink('link-36', 'min', 'link-8');">min</a></tt><tt class="py-op">)</tt> <tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">    <tt class="py-comment"># image</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">image</tt> <tt class="py-op">=</tt> <tt class="py-name">pygame</tt><tt class="py-op">.</tt><tt class="py-name">Surface</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'w'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">length</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">                                <tt class="py-name">pygame</tt><tt class="py-op">.</tt><tt class="py-name">SRCALPHA</tt><tt class="py-op">,</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'image'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">    <tt class="py-name">strip_img</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method widgets.VerticalProgressBar.get_strip_img()=widgets.VerticalProgressBar-class.html#get_strip_img"><a title="widgets.VerticalProgressBar.get_strip_img" class="py-name" href="#" onclick="return doclink('link-37', 'get_strip_img', 'link-37');">get_strip_img</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">convert_alpha</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">image</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">strip</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">length</tt> <tt class="py-op">*</tt> <tt class="py-name">tmp_val</tt> <tt class="py-op">/</tt> <tt class="py-number">400</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">      <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">image</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="base.Overlay.blit" class="py-name" href="#" onclick="return doclink('link-38', 'blit', 'link-34');">blit</a></tt><tt class="py-op">(</tt><tt class="py-name">strip_img</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">length</tt> <tt class="py-op">-</tt> <tt class="py-name">strip</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">    <tt class="py-comment"># rect</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"><tt class="py-comment"></tt>    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">rect</tt> <tt class="py-op">=</tt> <tt class="py-name">pygame</tt><tt class="py-op">.</tt><tt class="py-name">Rect</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pos</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">gfx</tt><tt class="py-op">[</tt><tt class="py-string">'strip'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'w'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">length</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Jul 31 17:03:03 2008
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
